<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- | Formats on this architecture</span><span>
</span><span id="line-2"></span><span class="hs-comment">--      A Format is a combination of width and class</span><span>
</span><span id="line-3"></span><span class="hs-comment">--</span><span>
</span><span id="line-4"></span><span class="hs-comment">--      TODO:   Signed vs unsigned?</span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span>
</span><span id="line-6"></span><span class="hs-comment">--      TODO:   This module is currently shared by all architectures because</span><span>
</span><span id="line-7"></span><span class="hs-comment">--              NCGMonad need to know about it to make a VReg. It would be better</span><span>
</span><span id="line-8"></span><span class="hs-comment">--              to have architecture specific formats, and do the overloading</span><span>
</span><span id="line-9"></span><span class="hs-comment">--              properly. eg SPARC doesn't care about FF80.</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm.Format</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier">Format</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#intFormat"><span class="hs-identifier">intFormat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#floatFormat"><span class="hs-identifier">floatFormat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#isFloatFormat"><span class="hs-identifier">isFloatFormat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#cmmTypeFormat"><span class="hs-identifier">cmmTypeFormat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#formatToWidth"><span class="hs-identifier">formatToWidth</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#formatInBytes"><span class="hs-identifier">formatInBytes</span></a></span><span>
</span><span id="line-19"></span><span class="hs-special">)</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">where</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-comment">-- It looks very like the old MachRep, but it's now of purely local</span><span>
</span><span id="line-29"></span><span class="hs-comment">-- significance, here in the native code generator.  You can change it</span><span>
</span><span id="line-30"></span><span class="hs-comment">-- without global consequences.</span><span>
</span><span id="line-31"></span><span class="hs-comment">--</span><span>
</span><span id="line-32"></span><span class="hs-comment">-- A major use is as an opcode qualifier; thus the opcode</span><span>
</span><span id="line-33"></span><span class="hs-comment">--      mov.l a b</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- might be encoded</span><span>
</span><span id="line-35"></span><span class="hs-comment">--      MOV II32 a b</span><span>
</span><span id="line-36"></span><span class="hs-comment">-- where the Format field encodes the &quot;.l&quot; part.</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-comment">-- ToDo: it's not clear to me that we need separate signed-vs-unsigned formats</span><span>
</span><span id="line-39"></span><span class="hs-comment">--        here.  I've removed them from the x86 version, we'll see what happens --SDM</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-comment">-- ToDo: quite a few occurrences of Format could usefully be replaced by Width</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-keyword">data</span><span> </span><span id="Format"><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier hs-var">Format</span></a></span></span><span>
</span><span id="line-44"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="II8"><span class="annot"><a href="GHC.CmmToAsm.Format.html#II8"><span class="hs-identifier hs-var">II8</span></a></span></span><span>
</span><span id="line-45"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="II16"><span class="annot"><a href="GHC.CmmToAsm.Format.html#II16"><span class="hs-identifier hs-var">II16</span></a></span></span><span>
</span><span id="line-46"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="II32"><span class="annot"><a href="GHC.CmmToAsm.Format.html#II32"><span class="hs-identifier hs-var">II32</span></a></span></span><span>
</span><span id="line-47"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="II64"><span class="annot"><a href="GHC.CmmToAsm.Format.html#II64"><span class="hs-identifier hs-var">II64</span></a></span></span><span>
</span><span id="line-48"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="FF32"><span class="annot"><a href="GHC.CmmToAsm.Format.html#FF32"><span class="hs-identifier hs-var">FF32</span></a></span></span><span>
</span><span id="line-49"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="FF64"><span class="annot"><a href="GHC.CmmToAsm.Format.html#FF64"><span class="hs-identifier hs-var">FF64</span></a></span></span><span>
</span><span id="line-50"></span><span>        </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681007727"><span id="local-6989586621681007729"><span id="local-6989586621681007731"><span class="annot"><span class="annottext">Int -&gt; Format -&gt; ShowS
[Format] -&gt; ShowS
Format -&gt; String
(Int -&gt; Format -&gt; ShowS)
-&gt; (Format -&gt; String) -&gt; ([Format] -&gt; ShowS) -&gt; Show Format
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Format] -&gt; ShowS
$cshowList :: [Format] -&gt; ShowS
show :: Format -&gt; String
$cshow :: Format -&gt; String
showsPrec :: Int -&gt; Format -&gt; ShowS
$cshowsPrec :: Int -&gt; Format -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681007722"><span id="local-6989586621681007724"><span class="annot"><span class="annottext">Format -&gt; Format -&gt; Bool
(Format -&gt; Format -&gt; Bool)
-&gt; (Format -&gt; Format -&gt; Bool) -&gt; Eq Format
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Format -&gt; Format -&gt; Bool
$c/= :: Format -&gt; Format -&gt; Bool
== :: Format -&gt; Format -&gt; Bool
$c== :: Format -&gt; Format -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-comment">-- | Get the integer format of this width.</span><span>
</span><span id="line-54"></span><span class="annot"><a href="GHC.CmmToAsm.Format.html#intFormat"><span class="hs-identifier hs-type">intFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Type.html#Width"><span class="hs-identifier hs-type">Width</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span>
</span><span id="line-55"></span><span id="intFormat"><span class="annot"><span class="annottext">intFormat :: Width -&gt; Format
</span><a href="GHC.CmmToAsm.Format.html#intFormat"><span class="hs-identifier hs-var hs-var">intFormat</span></a></span></span><span> </span><span id="local-6989586621681007720"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681007720"><span class="hs-identifier hs-var">width</span></a></span></span><span>
</span><span id="line-56"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681007720"><span class="hs-identifier hs-var">width</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W8"><span class="hs-identifier hs-var">W8</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#II8"><span class="hs-identifier hs-var">II8</span></a></span><span>
</span><span id="line-58"></span><span>        </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W16"><span class="hs-identifier hs-var">W16</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#II16"><span class="hs-identifier hs-var">II16</span></a></span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#II32"><span class="hs-identifier hs-var">II32</span></a></span><span>
</span><span id="line-60"></span><span>        </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#II64"><span class="hs-identifier hs-var">II64</span></a></span><span>
</span><span id="line-61"></span><span>        </span><span id="local-6989586621681007715"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681007715"><span class="hs-identifier hs-var">other</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Format
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#sorry"><span class="hs-identifier hs-var">sorry</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Format) -&gt; String -&gt; Format
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The native code generator cannot &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-62"></span><span>            </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;produce code for Format.intFormat &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681007715"><span class="hs-identifier hs-var">other</span></a></span><span>
</span><span id="line-63"></span><span>            </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n\tConsider using the llvm backend with -fllvm&quot;</span></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">-- | Get the float format of this width.</span><span>
</span><span id="line-67"></span><span class="annot"><a href="GHC.CmmToAsm.Format.html#floatFormat"><span class="hs-identifier hs-type">floatFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Type.html#Width"><span class="hs-identifier hs-type">Width</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span>
</span><span id="line-68"></span><span id="floatFormat"><span class="annot"><span class="annottext">floatFormat :: Width -&gt; Format
</span><a href="GHC.CmmToAsm.Format.html#floatFormat"><span class="hs-identifier hs-var hs-var">floatFormat</span></a></span></span><span> </span><span id="local-6989586621681007712"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681007712"><span class="hs-identifier hs-var">width</span></a></span></span><span>
</span><span id="line-69"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681007712"><span class="hs-identifier hs-var">width</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-70"></span><span>        </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#FF32"><span class="hs-identifier hs-var">FF32</span></a></span><span>
</span><span id="line-71"></span><span>        </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#FF64"><span class="hs-identifier hs-var">FF64</span></a></span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span>        </span><span id="local-6989586621681007711"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681007711"><span class="hs-identifier hs-var">other</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Format
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Format.floatFormat&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681007711"><span class="hs-identifier hs-var">other</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | Check if a format represents a floating point value.</span><span>
</span><span id="line-77"></span><span class="annot"><a href="GHC.CmmToAsm.Format.html#isFloatFormat"><span class="hs-identifier hs-type">isFloatFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-78"></span><span id="isFloatFormat"><span class="annot"><span class="annottext">isFloatFormat :: Format -&gt; Bool
</span><a href="GHC.CmmToAsm.Format.html#isFloatFormat"><span class="hs-identifier hs-var hs-var">isFloatFormat</span></a></span></span><span> </span><span id="local-6989586621681007708"><span class="annot"><span class="annottext">Format
</span><a href="#local-6989586621681007708"><span class="hs-identifier hs-var">format</span></a></span></span><span>
</span><span id="line-79"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="#local-6989586621681007708"><span class="hs-identifier hs-var">format</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-80"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#FF32"><span class="hs-identifier hs-var">FF32</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-81"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#FF64"><span class="hs-identifier hs-var">FF64</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-82"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- | Convert a Cmm type to a Format.</span><span>
</span><span id="line-86"></span><span class="annot"><a href="GHC.CmmToAsm.Format.html#cmmTypeFormat"><span class="hs-identifier hs-type">cmmTypeFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Type.html#CmmType"><span class="hs-identifier hs-type">CmmType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span>
</span><span id="line-87"></span><span id="cmmTypeFormat"><span class="annot"><span class="annottext">cmmTypeFormat :: CmmType -&gt; Format
</span><a href="GHC.CmmToAsm.Format.html#cmmTypeFormat"><span class="hs-identifier hs-var hs-var">cmmTypeFormat</span></a></span></span><span> </span><span id="local-6989586621681007707"><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621681007707"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-88"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmType -&gt; Bool
</span><a href="GHC.Cmm.Type.html#isFloatType"><span class="hs-identifier hs-var">isFloatType</span></a></span><span> </span><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621681007707"><span class="hs-identifier hs-var">ty</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Format
</span><a href="GHC.CmmToAsm.Format.html#floatFormat"><span class="hs-identifier hs-var">floatFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmType -&gt; Width
</span><a href="GHC.Cmm.Type.html#typeWidth"><span class="hs-identifier hs-var">typeWidth</span></a></span><span> </span><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621681007707"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Format
</span><a href="GHC.CmmToAsm.Format.html#intFormat"><span class="hs-identifier hs-var">intFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmType -&gt; Width
</span><a href="GHC.Cmm.Type.html#typeWidth"><span class="hs-identifier hs-var">typeWidth</span></a></span><span> </span><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621681007707"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">-- | Get the Width of a Format.</span><span>
</span><span id="line-93"></span><span class="annot"><a href="GHC.CmmToAsm.Format.html#formatToWidth"><span class="hs-identifier hs-type">formatToWidth</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Type.html#Width"><span class="hs-identifier hs-type">Width</span></a></span><span>
</span><span id="line-94"></span><span id="formatToWidth"><span class="annot"><span class="annottext">formatToWidth :: Format -&gt; Width
</span><a href="GHC.CmmToAsm.Format.html#formatToWidth"><span class="hs-identifier hs-var hs-var">formatToWidth</span></a></span></span><span> </span><span id="local-6989586621681007704"><span class="annot"><span class="annottext">Format
</span><a href="#local-6989586621681007704"><span class="hs-identifier hs-var">format</span></a></span></span><span>
</span><span id="line-95"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="#local-6989586621681007704"><span class="hs-identifier hs-var">format</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-96"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#II8"><span class="hs-identifier hs-var">II8</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W8"><span class="hs-identifier hs-var">W8</span></a></span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#II16"><span class="hs-identifier hs-var">II16</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W16"><span class="hs-identifier hs-var">W16</span></a></span><span>
</span><span id="line-98"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#II32"><span class="hs-identifier hs-var">II32</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span>
</span><span id="line-99"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#II64"><span class="hs-identifier hs-var">II64</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span>
</span><span id="line-100"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#FF32"><span class="hs-identifier hs-var">FF32</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span>
</span><span id="line-101"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#FF64"><span class="hs-identifier hs-var">FF64</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="annot"><a href="GHC.CmmToAsm.Format.html#formatInBytes"><span class="hs-identifier hs-type">formatInBytes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-105"></span><span id="formatInBytes"><span class="annot"><span class="annottext">formatInBytes :: Format -&gt; Int
</span><a href="GHC.CmmToAsm.Format.html#formatInBytes"><span class="hs-identifier hs-var hs-var">formatInBytes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Int
</span><a href="GHC.Cmm.Type.html#widthInBytes"><span class="hs-identifier hs-var">widthInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">(Width -&gt; Int) -&gt; (Format -&gt; Width) -&gt; Format -&gt; Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Format -&gt; Width
</span><a href="GHC.CmmToAsm.Format.html#formatToWidth"><span class="hs-identifier hs-var">formatToWidth</span></a></span><span>
</span><span id="line-106"></span></pre></body></html>